﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Linq;
using QSHC.QSchedule.Silverlight.Helpers;

namespace QSHC.QSchedule.Web.Models
{
    public partial class PhysicianSchedule
    {
        public LogPhysicianSchedule LastLog
        {
            get
            {
                return this.Logs.OrderByDescending(p => p.LogDateTime)
                                .FirstOrDefault();
            }
        }

        public string LastEmployeeLog
        {
            get
            {
                return EmployeeHelper.GetEmployee(LastLog.EmployeeCode).FirstName;
            }
        }
    }
}
